Spring Boot/Spring Cloud MCQ QUESTIONS AND ANSWER Sample Test,Sample questions

Question:
 For centralized logging, which tool is typically integrated with Spring Cloud Sleuth for visualization?

1.Prometheus

2.Grafana

3.Zipkin

4.Kibana

Posted Date:-2024-01-29 17:20:45


Question:
 What is the HTTP Status Code Related to Page Not Found?

1.402

2.404

3.403

4.401

Posted Date:-2024-01-29 17:35:50


Question:
 Which Spring Cloud project provides a distributed tracing solution?

1.Spring Cloud Sleuth

2.Spring Cloud Zipkin

3.Both a and b

4.None of the above

Posted Date:-2024-01-29 17:19:02


Question:
Choose the correct URI format to get a sub-resource by resource id and sub-resource id

1.{resource}/{resource-id}/{sub-resource}/{sub-resource-id}

2./{resource}/{sub-resource}/{sub-resource-id}

3.{sub-resource}/{sub-resource-id}/{resource}/{resource-id}

4./{resource}/{resource-id}/{sub-resource-id}/{sub-resource}

Posted Date:-2024-01-29 17:37:44


Question:
What are microservices?

1.A design pattern used primarily in functional programming and object-oriented programming

2.Microservices are used to build monolithic architecture

3.Microservices are a software architectural style in which a large application is built as a collection of small, independent, and scalable services

4.None of the above

Posted Date:-2024-01-29 17:27:16


Question:
What are some benefits of using microservices? 

1.Scalability

2.Resilience

3.Flexibility

4.All of the above

Posted Date:-2024-01-29 17:29:14


Question:
What are some common patterns for communication between microservices? 

1.RESTful API

2.Messaging

3.Both a and b

4.None of the above

Posted Date:-2024-01-29 17:33:40


Question:
What are the different ways to make a REST API call in Microservices?

1.Using RestTemplate

2. Using WebClient

3.Using Spring Cloud OpenFeign

4.all of the above

Posted Date:-2024-01-29 17:28:48


Question:
What does Spring Cloud Stream primarily deal with?

1.RESTful services

2.Event-driven architecture

3.Synchronous calls

4. Template rendering

Posted Date:-2024-01-29 17:24:29


Question:
What does the Acronym REST Stand for?

1.Representational State Transform

2.Representational State Transfer

3.Represent State Transform

4.Represent State Transfer

Posted Date:-2024-01-29 17:34:55


Question:
What is a container in the context of microservices? 

1.A software package that contains all necessary dependencies for a service to run

2. A physical machine that runs a service

3.A virtual machine that runs a service

4.A network of services that communicate with each other

Posted Date:-2024-01-29 17:30:48


Question:
What is Spring Cloud Bus used for?

1.Transporting data between services

2.Providing centralized configuration

3.Broadcasting state changes

4.Data serialization

Posted Date:-2024-01-29 17:19:55


Question:
What is Spring Cloud Sleuth used for?

1.Security

2.Distributed tracing

3.Logging

4. Data access

Posted Date:-2024-01-29 17:24:53


Question:
What is the benefit of using a message broker in a microservices architecture? 

1.It decouples services from each other

2.It allows services to communicate asynchronously

3.It provides load balancing and scalability

4.All of the above

Posted Date:-2024-01-29 17:32:40


Question:
What is the difference between a monolithic and microservices architecture? 

1.Monolithic architecture is a single, large, complex service, while microservices are small, autonomous services.

2.Monolithic architecture is a single, small, simple service, while microservices are large, complex services.

3.Monolithic architecture is a group of small, simple services, while microservices are large, complex services.

4.Monolithic architecture is a group of large, complex services, while microservices are small, autonomous services.

Posted Date:-2024-01-29 17:29:44


Question:
What is the difference between a service registry and a service discovery? 

1.A service registry keeps track of all microservices, while service discovery helps clients find the correct microservice.

2.A service registry helps clients find the correct microservice, while service discovery keeps track of all microservices.

3. Both are the same thing.

4. None of the above.

Posted Date:-2024-01-29 17:34:02


Question:
What is the difference between POST and PUT methods in REST API? 

1.POST is used for creating resources, while PUT is used for updating resources

2.POST updates the entire resource, while PUT updates only specific fields of a resource

3.POST requires authentication, while PUT does not

4.POST is used for creating resources, while PUT updates only specific fields of a resource

Posted Date:-2024-01-29 17:40:47


Question:
What is the difference between PUT and PATCH methods in REST API? 

1.PUT is used for creating resources, while PATCH is used for updating resources

2.PUT updates the entire resource, while PATCH updates only specific fields of a resource

3.PUT requires authentication, while PATCH does not

4.PUT is idempotent, while PATCH is not Click to View Answer and Explanation

Posted Date:-2024-01-29 17:39:32


Question:
What is the function of the @EnableDiscoveryClient annotation?

1.Enable WebSocket support

2.Enable service discovery

3.Enable data validation

4.Enable Spring Cloud Bus

Posted Date:-2024-01-29 17:25:21


Question:
What is the HTTP Code 200 Indicate?

1.Error

2.Completed

3.Success

4.Warning

Posted Date:-2024-01-29 17:36:32


Question:
What is the HTTP Code Related to Internal Server Error?

1.500

2.501

3.504

4.502

Posted Date:-2024-01-29 17:36:13


Question:
What is the HTTP status code 201 indicate?

1.OK

2.Created

3.Accepted

4.No Content

Posted Date:-2024-01-29 17:38:31


Question:
What is the main function of Spring Cloud Vault?

1.Data modeling

2.Secrets management

3.API gateway

4.Asynchronous programming

Posted Date:-2024-01-29 17:20:23


Question:
What is the primary function of Spring Cloud Eureka?

1.Load balancing

2. Service discovery

3.API Gateway

4.Circuit breaking

Posted Date:-2024-01-29 17:17:44


Question:
What is the primary purpose of Spring Cloud?

1.Database management

2. Web application development

3.Microservices architecture support

4.Machine learning development

Posted Date:-2024-01-29 17:16:44


Question:
What is the protocol used in REST?

1.FTP

2.HTTP

3.JMX

4.SOAP

Posted Date:-2024-01-29 17:35:22


Question:
What is the purpose of the "Authorization" header in a REST API request? 

1.It specifies the format of the request payload

2.It provides additional metadata about the request

3.It provides authentication credentials for accessing protected resources

4.It determines the cache control policy for the request

Posted Date:-2024-01-29 17:40:23


Question:
What is the role of a service registry in a microservices architecture?

1.It keeps track of all running instances of a service

2.It allows services to discover each other

3. It provides load balancing for services

4.All of the above

Posted Date:-2024-01-29 17:33:16


Question:
What is the role of an API gateway in a microservices architecture? 

1.To handle authentication and authorization for services

2.To provide a single entry point for external clients to access services

3. To route requests to the appropriate service

4. All of the above

Posted Date:-2024-01-29 17:32:19


Question:
What is the role of the "Content-Type" header in a REST API request? 

1.It specifies the HTTP method to be used

2.It defines the format of the request payload

3.It provides authentication credentials

4.It determines the cache control policy for the request

Posted Date:-2024-01-29 17:39:58


Question:
Which component in Spring Cloud helps in client-side load balancing?

1.Hystrix

2.Spring Cloud LoadBalancer

3.Zuul

4.Sleuth

Posted Date:-2024-01-29 17:18:19


Question:
Which Framework provides tools to build common patterns in distributed systems or Microservices projects?

1. Spring Boot

2.Spring Data

3.Spring Cloud

4.Spring Integration

Posted Date:-2024-01-29 17:27:54


Question:
Which HTTP method do we use to make an HTTP request to create a new resource?

1.POST

2.PUT

3.GET

4.CREATE

Posted Date:-2024-01-29 17:36:50


Question:
Which HTTP method do we use to make an HTTP request to update an existing resource?

1.POST

2.PUT

3.UPDATE

4.DELETE

Posted Date:-2024-01-29 17:37:17


Question:
Which HTTP methods are commonly used in REST API operations? 

1.GET, POST, PUT, DELETE

2.CREATE, READ, UPDATE, DELETE

3.INSERT, SELECT, UPDATE, DELETE

4.SEND, RECEIVE, MODIFY, DELETE

Posted Date:-2024-01-29 17:38:55


Question:
Which is not REST Architectural Constraints?

1.Client-Server

2.Stateless

3.Cacheable

4.Service orchestration

Posted Date:-2024-01-29 17:38:05


Question:
Which of the following is a centralized service registry and discovery solution in Spring Cloud?

1. Spring Cloud Stream

2. Spring Cloud Eureka

3.Spring Cloud Gateway

4.Spring Cloud Config

Posted Date:-2024-01-29 17:25:46


Question:
Which of the following is a primary function of Spring Cloud Gateway?

1.Data storage and retrieval

2. Service discovery and registration

3.Routing and API gateway operations

4.Event-driven messaging

Posted Date:-2024-01-29 17:26:13


Question:
Which of the following projects provides declarative REST client capabilities?

1.Spring Cloud OpenFeign

2. Spring Cloud Config

3. Spring Cloud Task

4.Spring Cloud Gateway

Posted Date:-2024-01-29 17:23:38


Question:
Which of the following projects provides OAuth2-based authentication and authorization?

1.Spring Cloud Vault

2. Spring Cloud Security

3.Spring Cloud Stream

4.Spring Cloud Task

Posted Date:-2024-01-29 17:19:29


Question:
Which Spring cloud module is used to externalize the configuration of microservices into a centralized place?

1.Spring Cloud Netflix

2.Spring Cloud Gateway

3. Spring Cloud OpenFeign

4. Spring Cloud Config

Posted Date:-2024-01-29 17:30:12


Question:
Which Spring Cloud module is used to make a REST API call?

1.Spring Cloud OpenFeign

2.Spring Cloud Sleuth

3.Spring Cloud Netflix

4. Spring Cloud Bus

Posted Date:-2024-01-29 17:28:22


Question:
Which Spring Cloud project provides centralized configuration management?

1.Spring Cloud Netflix

2.Spring Cloud Gateway

3.Spring Cloud Config

4. Spring Cloud Security

Posted Date:-2024-01-29 17:17:19


More MCQS

  1. Spring Boot Common Test
  2. Spring Boot - Bootstrapping
  3. Spring Boot - Logging
  4. Spring Boot - Application Properties
  5. Spring Boot - RESTful Web Services
  6. Spring Boot - Exception Handling
  7. Spring Boot - Interceptor
  8. Spring Boot - File Handling
  9. Spring Boot - CORS
  10. Spring Boot - Internationalization
  11. Spring Boot - Scheduling
  12. Spring MCQs
  13. SPRING BOOT MCQ QUESTIONS
  14. Spring MVC MCQ QUESTIONS AND ANSWER
  15. Spring Cloud MCQ QUESTIONS AND ANSWER
  16. Spring WebFlux MCQ OUESTIONS AND ANSWER
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!